//
// Created by jsjxsy on 2022/8/15.
// 全局友元
//
#include <string>
#include <iostream>
using namespace std;
class Building {
 public:
  Building();
  ~Building();
  string bedRoom;
  friend void visit();
  void test();
 private:
  string classRoom;
};

Building::Building() {
  bedRoom = "我的卧室";
  classRoom = "我的客厅";
}
void Building::test() {
  cout << "test" << endl;
}
Building::~Building() {

}

void visit() {
  Building building;
  cout << building.bedRoom << endl;
  cout << building.classRoom << endl;
  building.test();
}

int main(void) {
  visit();
  return 0;
}
